<?php
include "includes/ui.php";

echo headerHTML("account","จัดการเงินเดือน");
?>
 <!-- Moldule: Popup -->
<div id="popup" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="width:700px;">

        <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h3 id="myModalLabel"><i class="icon-cog"></i> จัดการเงินเดือน </h3>
        </div>
  <form class="form-horizontal" style="margin-bottom:0px;">
        <div class="modal-body">

			<div class="control-group">
					<label class="control-label" for="inputName" style='font-weight:bold;margin-top:0px;padding-top:0px;width:100px !important;'><i class="icon-double-angle-right"></i> ประจำเดือน </label>
					<div class="controls" style='margin-left:100px !important;'>
						  &nbsp;<span class="help-inline" style="color:blue;" id='month_salary'> 03/2014</span>
						  
						  &nbsp;<span class="help-inline" style="font-weight:bold;margin-left:50px;"> รหัสประจำตัว</span>
						  &nbsp;<span class="help-inline" style="" id='emp_code'></span>
					</div>
			</div>

			 <div class="control-group">
					<label class="control-label" for="inputName" style='font-weight:bold;margin-top:0px;padding-top:0px;width:100px !important;'><i class="icon-double-angle-right"></i> ชื่อ-นามสกุล</label>
					<div class="controls" style='margin-left:100px !important;'>
						 &nbsp;<span class="help-inline" style="" id='emp_name' > นาย ภาพง คงใจดี</span>
						  
						 &nbsp;<span class="help-inline" style="font-weight:bold;margin-left:50px;"> ตำแหน่ง</span>
						  &nbsp;<span class="help-inline" style="" id='emp_position' > นาย ภาพง คงใจดี</span>
					</div>
			</div>
			 <div class="well no-padding">
				<div class="top-bar" style="padding-left: 0px;">
					<ul class="tab-container">
					  <li class="active"><a href="#tab-income"> รายการเงินได้</a></li>
					  <li><a href="#tab-outcome"> รายการหักเงินได้</a></li>
					</ul>

				</div>
				<div class="well no-padding tab-content">
					<div class="tab-pane active" id="tab-income">
						 
						<div style="padding:5px;" class='group_control'>
						  <span class="help-inline" style=""> รายการเงินได้ :</span>
						  <select class="no-margin span3" id="cboName_in"  style="width:220px !important;">
							</select>&nbsp;&nbsp;
						  <input type="text" id="txtAmt_in" class='span1 text-right txtamt' style='width:100px;' placeholder="จำนวนงิน">
						  &nbsp;&nbsp;
						  <button class="btn btn-warning" type='button' id='btnAddIn' style=' margin-bottom:0px;'>เพิ่ม</button>
						</div>
						<!-- Add News: WYSIWYG Edior -->
						<table class="table table-bordered" id="result_in" style='width:100% !important;'>
						  <thead>
							<tr>
							<th style='color:#333 !important;width:40px !important;'>#</th>
							<th style='color:#333 !important;display:none; '>0</th>
							 <th style='color:#333 !important;display:none; '>0</th>
							  <th style='color:#333 !important;' class='text-left'>รายการ</th>
							  <th style='color:#333 !important;width:100px;' class='center'>จำนวนเงิน</th>
							  <th style='color:#333 !important;width:90px !important;' class='center'>ลบ</th>
							    
							</tr>
						  </thead>
						  <tbody>
							 
						  </tbody>
						</table>
							<!-- / Add News: WYSIWYG Edior -->

						 
					</div>
				
					<div class="tab-pane" id="tab-outcome">
					 
						<div style="padding:5px;" class='group_control'>
							<span class="help-inline" style=""> รายการหักเงินได้ :</span>
						   <select class="no-margin span3" id="cboName_out"  style="width:220px !important;">
								</select>&nbsp;&nbsp;
						  <input type="text" id="txtAmt_out" class='span1 text-right txtamt' style='width:100px;' placeholder="จำนวนเงิน">
						  &nbsp;&nbsp;
						  <button class="btn btn-warning" type='button' id='btnAddOut' style=' margin-bottom:0px;'>เพิ่ม</button>
						</div>
						<!-- Add News: WYSIWYG Edior -->
						<table class="table table-bordered"  id="result_out"  style='width:100% !important;'>
						  <thead>
							<tr>
							<th style='color:#333 !important;width:40px !important;'>#</th>
							  <th style='color:#333 !important;display:none; '>0</th>
							  <th style='color:#333 !important;display:none; '>0</th>
						  <th style='color:#333 !important;' class='text-left'>รายการ</th>
							  <th style='color:#333 !important;width:100px;' class='center'>จำนวนเงิน</th>
							  <th style='color:#333 !important;width:60px;'>ลบ</th>
							</tr>
						  </thead>
						  <tbody>
						 
						  </tbody>
						</table>
						<!-- / Add News: WYSIWYG Edior -->
 
					</div>
				</div>
			</div>
  
			<div class="control-group">
					<label class="control-label" for="inputName" style='font-weight:bold;'><i class="icon-double-angle-right"></i> ยอดรวม</label>
				<div class="controls" style='margin-left:100px;'>
					 <input type="text" id="txtTotal" class='span1 text-right' style='color:red;width:100px;' readonly placeholder="0">
				</div>
			</div>
        </div>
		 
     <div class="modal-footer">
            <button type='button' type='button' class="btn btn-primary hidden_control" id="btnSave">บันทึก</button>
            <button class="btn" data-dismiss="modal" id='btnCancel' aria-hidden="true">ยกเลิก</button>
        
        </div>
 </form>
</div> 
<div id="popup_monthly" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" >
	 <div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
		<h3 id="myModalLabel"><i class="icon-cog"></i> ปรับข้อมูล</h3>
	</div>
	<form class="form-horizontal" id='frmMonthlyClosing' style='margin-bottom:0px;'>
		<input type='hidden' name='sid' id='sid' value=''/>
		<input type='hidden' name='y' id='y' value=''/>
		<input type='hidden' name='t' id='t' value=''/>
        <div class="modal-body">
			<div class="control-group">
					<label class="control-label" for="inputName" style='width:100px;'><i class="icon-double-angle-right"></i> เดือนที่</label>
					<div class="controls" style='margin-left:90px;'>
						<input class="span2" style="width:150px !important;" id='txtNextMonth' name='txtNextMonth'  type="text" readonly>
					</div>
			</div>
			<div class="control-group">
					<label class="control-label" for="inputName" style='width:100px;'>  &nbsp;</label>
					<div class="controls" style='margin-left:50px;'>
					 <span class="help-inline" style='color:red;'>** หลังจากปรับเดือนแล้ว ข้อมูลเก่าจะไม่สามารถแก้ไขได้</span>
					</div>
			</div>
        </div>
        <div class="modal-footer">
			<a href="#popupProcess" data-toggle="modal"><button type='button' class="btn btn-primary" id="btnProcess">บันทึก</button></a>
			<button class="btn" data-dismiss="modal" aria-hidden="true">ยกเลิก</button>
        </div>
	</form>
</div>

 <div id="popupProcess" class="modal hide fade" style="width:350px;top:35% !important;margin-left:-180px;" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">

    <div class="modal-header" style='padding-top:20px;padding-bottom:25px;'>
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h3 id="myModalLabel" style="color:#72a9c9;"><img src='img/info1.png' width='24px'/> คุณต้องการปรับเดือน ?</h3>
    </div>
  
    <div class="modal-footer center" style="text-align:center !important;padding-top:15px;padding-bottom:15px;">
        <button type='button'  class="btn btn-primary" id="btnProcess_Confirm">ตกลง</button>
        <button class="btn" data-dismiss="modal" aria-hidden="true">ยกเลิก</button>
    </div>
 
</div> 
<!-- / Module: Popup --> 
<!-- Live Stats -->
<div class="row-fluid">

    <!-- Pie: Box -->
    <div class="span12">

        <!--  : Top Bar -->
        <div class="top-bar">
            <h3><i class="icon-cog"></i> หน้าจัดการเงินเดือน</h3>
            <div class='tmp' style='float:right'>
				<a href="#" ><button id='btnPrintAll' class="btn"   >พิมพ์ ใบจ่ายเงินเดือน</button></a>
              <a href="#popup_monthly" data-toggle='modal' ><button id='btnMonthly' class="btn btn-warning" rel="tooltip" title="" >ปรับเดือน</button></a>
            </div>
        </div>
        <!-- /  : Top Bar -->
		
        <!-- Pie: Content -->
        <div class="well no-padding">
			<div class="span12">
				<form class="form-horizontal" id='frmSalaryReport' method='POST' style="margin-bottom:0px;">
				<input type='hidden' name='emp_id' id='emp_id' value=''/>
				<div class="row-fluid">
				 
					<div class="control-group" >
							<label class="control-label"   for="inputName"><i class="icon-double-angle-right"></i>  เดือนที่ : </label>
							<div class="controls">
								<select class="no-margin span3" id="cboMonth"  style="width:150px !important;">
								</select>
								<span class="help-inline" style="font-weight:bold;margin-left:40px;">เลขประจำตัว&nbsp;</span>
								<input type="text" id="txtCode_s" maxlength="10" class='span2' placeholder="รหัสประจำตัว">
								<span class="help-inline text-algin" style="font-weight:bold;float:right;"> เดือนปัจจุบัน    : <span id='month_level' style='color:blue;'></span> </span>
							</div>
							
					  </div>
						  
					<div class="control-group" >
						<label class="control-label" style='padding-top:5px;'><i class="icon-double-angle-right"></i> ชื่อ-นามสกุล </label>
						<div class="controls">
							<input type="text" id="txtName_s" maxlength="80" class='span2' placeholder="ชื่อ-นามสกุล"/>
							<span class="help-inline" style="font-weight:bold;margin-left:50px;"> ฝ่าย/แผนก &nbsp;</span>
								
							<select class="no-margin span3" id="cboDepartment_s"  style="width:150px !important;">
							</select>
							 &nbsp;&nbsp;
							 <span class="help-inline" style="font-weight:bold;margin-left:50px;">สถานะ&nbsp;</span>
							 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
							 <select class="no-margin span3" id="cboStatus_s"   style="width:150px !important;">
							</select>
							
							 <button class="btn btn-inverse" type='button' style='height:30px;margin-left:50px;' id='btnSearch' rel="tooltip" title=""   data-original-title="ค้นหาข้อมูล"><i class="icon-search"></i></button> 
						</div>
						
					</div>
			 
					 
				</div>
			</form>
			</div>

            <table class="data-table" id="resultData">
                <thead style='border-top:1px solid #c2c2c2;border-bottom:1px solid #c2c2c2;'> 
                    <tr>
                        <th style='color:#333 !important;width:40px !important;'>#</th>
						<th style='color:#333 !important;width:0px !important;'>0</th>
                        <th style='color:#333 !important;width:100px !important;'>เลขประจำตัว</th>
                        <th style='color:#333 !important;' class='center'>ชื่อ - นามสกุล</th>
						<th style='color:#333 !important;width:150px;' class="center">แผนก/ฝ่าย </th>
						<th style='color:#333 !important;width:100px !important;' class="center">โทรศัพท์</th>
						<th style='color:#333 !important;width:110px !important;' class="center">สถานะ</th>
						 <th style='color:#333 !important;width:100px !important;' class="center">ปรับปรุงเมื่อ</th>
						<th style='color:#333 !important;width:130px !important;' class="center">ปรับปรุงโดย</th>
						<th style='color:#333 !important;width:80px !important;' class="center">เงินเดือน</th>
						<th style='color:#333 !important;width:70px !important;' class="center">พิมพ์</th>
                    </tr>
                </thead>
                <tbody>
                       
                </tbody>

            </table>

        </div>
        <!-- / Pie: Content -->

    </div>
    <!-- / Pie -->

</div>
<!-- / Live Stats -->

<?php
echo footerHTML();
?>

<!-- Javascript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<script src='js/jquery.hotkeys.js'></script>
<!--script src='js/fullcalendar.min.js'></script-->
<script src="js/jquery-ui-1.10.2.custom.min.js"></script>
<script src="js/jquery.pajinate.js"></script>
<!--script src="js/jquery.prism.min.js"></script-->
<script src="js/jquery.dataTables.min.js"></script>

<script src="js/jquery.flot.resize.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/bootstrap-wysiwyg.js"></script>
<!--script src="js/bootstrap-typeahead.js"></script-->
<script src="js/jquery.easing.min.js"></script>
<script src="js/jquery.chosen.min.js"></script>
<script src="js/avocado-custom.js"></script>

<script src="js/jqBootstrapValidation.js"></script>
<script src="js/bootstrap-datepicker.js"></script>
<script src="js/myScript/js_salary.js"></script>

</html>